import React, { useState, useEffect } from "react";
import ReactMarkdown from "react-markdown";
import remarkGfm from "remark-gfm";

const NotePage: React.FC = () => {
  const [mdContent, setMdContent] = useState("");

  // 获取md内容
  useEffect(() => {
    fetch("/md/note.md")
      .then(res => {
        return res.text();
      })
      .then(text => setMdContent(text));
  }, []);

  return (
    <div
      className="my-tag-bac"
      style={{ minHeight: "660px",paddingTop:"10px" }}
    >
      <ReactMarkdown
        remarkPlugins={[remarkGfm]}
        children={mdContent}
      />
    </div>
  );
};

export default NotePage;
